/* 更新颜色变量 */
:root {
  --primary-color: #1a73e8;
  --primary-light: #e8f0fe;
  --primary-hover: #1557b0;
  --secondary-color: #5f6368;
  --success-color: #34a853;
  --warning-color: #fbbc05;
  --error-color: #ea4335;
  --background-light: #f8f9fa;
  --background-white: #ffffff;
  --border-color: #e0e0e0;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --text-hint: #9aa0a6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);
  --transition-base: all 0.3s ease;
}

.health-management {
  padding: 24px;

  margin: 0 auto;
  
}

.health-header {
  margin-bottom: 32px;
}

.health-header h2 {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
}

.tab-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  background: var(--background-light);
  padding: 8px;
  border-radius: 12px;
  width: fit-content;
}

.tab-buttons button {
  padding: 12px 24px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.tab-buttons button:hover {
  background: rgba(26, 115, 232, 0.05);
  color: var(--primary-color);
}

.tab-buttons button.active {
  background: var(--primary-color);
  color: white;
}

/* 饮食记录部分样式 */
.diet-section {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 15px;
}

.diet-summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.summary-card {
  flex: 1;
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}

.summary-title {
  color: #666;
  font-size: 14px;
  margin-bottom: 10px;
}

.summary-value {
  font-size: 24px;
  font-weight: bold;
  color: #4CAF50;
}

.summary-value .unit {
  font-size: 14px;
  font-weight: normal;
  margin-left: 4px;
}

.diet-content {
  display: flex;
  gap: 20px;
}

.diet-left {
  flex: 2;
}

.diet-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.food-selection {
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.meal-options {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.meal-option {
  padding: 8px 16px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background-color: #f8f9fa;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.meal-option.active {
  background-color:rgb(0, 136, 220);
  color: white;
  border-color: #4CAF50;
}

.food-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.food-option {
  background-color: white;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.food-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.food-option.selected {
  border-color: #4CAF50;
  background-color: rgba(76, 175, 80, 0.05);
}

.food-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.food-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.food-name {
  font-weight: bold;
  font-size: 16px;
}

.portion {
  color: #666;
  font-size: 14px;
}

.calories {
  color: #4CAF50;
  font-weight: bold;
}

.diet-form {
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.diet-form h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.diet-list {
  background-color: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex: 1;
  overflow-y: auto;
}

.diet-list h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #333;
}

.diet-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #eee;
}

.diet-item:last-child {
  border-bottom: none;
}

.meal-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meal-time {
  color: #666;
  font-size: 12px;
}

.meal-type {
  font-weight: bold;
  color: #333;
}

.food-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.food-name {
  color: #333;
}

.food-calories {
  color: #4CAF50;
  font-weight: bold;
}

/* 数据监测部分样式 */
.monitor-section {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-container {
  margin-bottom: 30px;
  height: 300px;
}

.health-stats {
  display: flex;
  justify-content: space-around;
  gap: 15px;
}

.stat-card {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  flex: 1;
}

.stat-card h3 {
  color: #666;
  margin-bottom: 10px;
}

.stat-card p {
  font-size: 20px;
  font-weight: bold;
  color: #4CAF50;
  margin: 0;
}

/* Form Styles */
.health-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.blood-pressure-inputs {
  display: flex;
  gap: 10px;
}

input {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

input:focus {
  outline: none;
  border-color: #4CAF50;
}

button[type="submit"] {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

button[type="submit"]:hover {
  background-color: #45a049;
}

label {
  color: #666;
  font-size: 14px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .diet-content {
    flex-direction: column;
  }
  
  .food-options {
    grid-template-columns: 1fr;
  }
  
  .meal-options {
    flex-wrap: nowrap;
    text-align: center;
  }
}

.no-data-message {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  background-color: #f8f9fa;
  border-radius: 8px;
  color: #666;
  font-size: 16px;
  text-align: center;
  margin-bottom: 20px;
}

/* Health Alerts Styles */
.health-alerts {
  margin: 20px 0;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.alert.warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.alert.danger {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert h4 {
  margin: 0;
  font-size: 16px;
  font-weight: bold;
}

.alert p {
  margin: 0;
  font-size: 14px;
}

/* Nutrition Info Styles */
.nutrition-info {
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  font-size: 12px;
}

.nutrition-info h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
  text-align: center;
}

.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.nutrition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

.nutrition-item:last-child {
  border-bottom: none;
}

.nutrition-item span:first-child {
  color: #666;
}

.nutrition-item span:last-child {
  font-weight: bold;
  color: #4CAF50;
}

.additional-nutrition {
  border-top: 1px solid #eee;
  padding-top: 10px;
  margin-top: 10px;
}

.nutrition-toggle {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  text-align: center;
  transition: background-color 0.3s;
}

.nutrition-toggle:hover {
  background-color: #45a049;
}

/* Health Records Styles */
.health-records {
  margin-top: 30px;
}

.health-records h3 {
  color: #333;
  margin-bottom: 20px;
  font-size: 18px;
}

.health-record {
  background-color: white;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.record-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.record-date {
  color: #666;
  font-size: 14px;
}

.record-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.record-item span:first-child {
  color: #666;
  font-size: 14px;
}

.record-value {
  display: flex;
  align-items: center;
  gap: 10px;
}

.record-value span:first-child {
  font-weight: bold;
  color: #333;
}

.status-indicator {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.status-normal {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-warning {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-danger {
  background-color: #ffebee;
  color: #c62828;
}

/* No Records Styles */
.no-records {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.no-records p {
  color: #666;
  margin: 0;
}

.no-records p:first-child {
  font-size: 16px;
  margin-bottom: 10px;
}

.no-records .hint {
  font-size: 14px;
  color: #999;
}

/* Calorie Warning Styles */
.calorie-warning {
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.calorie-warning.warning {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffe0b2;
}

.calorie-warning.danger {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

.calorie-warning.success {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.calorie-warning.error {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Selected Record Styles */
.diet-item {
  cursor: pointer;
  transition: all 0.3s ease;
}

.diet-item:hover {
  background-color: #f8f9fa;
}

.diet-item.selected {
  background-color: rgba(76, 175, 80, 0.05);
  border-left: 4px solid #4CAF50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Form Group Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #4CAF50;
}

.form-group button {
  padding: 10px;
  background-color: rgb(0, 136, 220);

  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.form-group button:hover {
  background-color: #45a049;
}

/* Form Button Styles */
.add-button {
  background-color: rgb(0, 136, 220);
  color: var(--background-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.add-button:hover {
  background-color: rgb(0, 136, 220);

}

.add-button:disabled {
  background-color: var(--text-hint);
  cursor: not-allowed;
}

.update-button {
  background-color: var(--success-color);
  color: var(--background-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.update-button:hover {
  background-color: #2d9248;
}

.cancel-button {
  background-color: var(--error-color);
  color: var(--background-white);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.cancel-button:hover {
  background-color: #d33426;
}

/* Statistics Section Styles */
.statistics-section {
  padding: 24px;
  background: var(--background-light);
  border-radius: 16px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.stats-card {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: var(--transition-base);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats-card h3 {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.department-stat-item {
  padding: 16px;
  background: var(--background-light);
  border-radius: 8px;
  margin-bottom: 16px;
}

.department-stat-item h4 {
  color: var(--primary-color);
  margin-bottom: 12px;
}

.department-stat-item p {
  color: var(--text-secondary);
  margin: 8px 0;
}

.time-stat-item,
.weekly-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.time-stat-item:last-child,
.weekly-stat-item:last-child {
  border-bottom: none;
}

.time-stat-item span:last-child,
.weekly-stat-item span:last-child {
  color: var(--primary-color);
  font-weight: 500;
}

.schedule-table {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.schedule-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th {
  background: var(--background-light);
  padding: 16px;
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.schedule-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-table tbody tr {
  transition: var(--transition-base);
  cursor: pointer;
}

.schedule-table tbody tr:hover {
  background: var(--primary-light);
}

.no-data {
  text-align: center;
  color: var(--text-hint);
  padding: 32px;
}


/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-form,
.schedule-list {
  animation: fadeIn 0.3s ease-out;
}

/* 排班部分样式 */
.schedule-section {
  background: var(--background-light);
  border-radius: 16px;
  padding: 24px;
  min-height: calc(100vh - 200px);
}

.schedule-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
}

/* 左侧科室选择样式 */
.schedule-left {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  height: fit-content;
  position: sticky;
  top: 24px;
}

.department-selection {
  padding: 20px;
}

.department-selection h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.department-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.department-group {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-base);
}

.department-group:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.department-main {
  padding: 12px 16px;
  background: var(--background-light);
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.department-main::after {
  content: '▼';
  font-size: 12px;
  transition: transform 0.3s ease;
}

.department-main.expanded::after {
  transform: rotate(180deg);
}

.department-main:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.subdepartment-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--background-white);
}

.subdepartment-list.visible {
  max-height: 500px;
}

.subdepartment-item {
  padding: 12px 16px;
  padding-left: 24px;
  cursor: pointer;
  transition: var(--transition-base);
  color: var(--text-secondary);
  position: relative;
}

.subdepartment-item:hover {
  background: var(--primary-light);
  color: var(--primary-color);
}

.subdepartment-item.active {
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 500;
}

.subdepartment-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-color);
}

/* 右侧内容样式 */
.schedule-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 表单样式 */
.schedule-form {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.schedule-form h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.selected-department-info {
  background: var(--primary-light);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.selected-department-info p {
  color: var(--primary-color);
  font-weight: 500;
  margin: 0;
}

.form-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition-base);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group button {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-base);
}

.add-button {
  background: var(--primary-color);
  color: white;
}

.add-button:hover {
  background: var(--primary-hover);
}

.add-button:disabled {
  background: var(--text-hint);
  cursor: not-allowed;
}

.update-button {
  background: var(--success-color);
  color: white;
}

.update-button:hover {
  background: #2d9248;
}

.cancel-button {
  background: var(--error-color);
  color: white;
}

.cancel-button:hover {
  background: #d33426;
}

/* 排班列表样式 */
.schedule-list {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 20px;
  margin: 0 auto;
  width: 100%;
  max-height: 600px;
  overflow-y: auto;
}

.schedule-list h3 {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
}

.schedule-table {
  width: 100%;
  overflow-x: auto;
}

.schedule-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.schedule-table th {
  background: #f5f7ff;
  padding: 12px;
  text-align: center;
  font-weight: 500;
  color: var(--primary-color);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.schedule-table td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #eee;
  color: var(--text-secondary);
}

.schedule-table tbody tr {
  transition: var(--transition-base);
  cursor: pointer;
}

.schedule-table tbody tr:hover {
  background: rgba(26, 115, 232, 0.05);
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

/* 各列宽度调整 */
.schedule-table th:nth-child(1), 
.schedule-table td:nth-child(1) { /* 科室 */
  width: 15%;
}

.schedule-table th:nth-child(2),
.schedule-table td:nth-child(2) { /* 子科室 */
  width: 15%;
}

.schedule-table th:nth-child(3),
.schedule-table td:nth-child(3) { /* 医生 */
  width: 12%;
}

.schedule-table th:nth-child(4),
.schedule-table td:nth-child(4) { /* 职位 */
  width: 12%;
}

.schedule-table th:nth-child(5),
.schedule-table td:nth-child(5) { /* 日期 */
  width: 15%;
}

.schedule-table th:nth-child(6),
.schedule-table td:nth-child(6) { /* 时段 */
  width: 15%;
}

.schedule-table th:nth-child(7),
.schedule-table td:nth-child(7) { /* 备注 */
  width: 16%;
}

/* 表格内容样式 */
.schedule-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* 空数据样式 */
.no-data {
  text-align: center;
  padding: 30px 0;
  color: var(--text-hint);
  font-size: 14px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 10px 0;
}

/* 滚动条样式 */
.schedule-list::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.schedule-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.schedule-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.schedule-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 表格行交替颜色 */
.schedule-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.schedule-table tbody tr:hover {
  background-color: #f0f7ff;
}

/* 单元格内容溢出处理 */
.schedule-table td.notes {
  position: relative;
}

.schedule-table td.notes:hover::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: normal;
  max-width: 200px;
  z-index: 2;
}

/* 调整表格容器的布局 */
.schedule-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.schedule-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* 防止表格溢出 */
}

/* 确保表格在小屏幕上也能正常显示 */
@media screen and (max-width: 1200px) {
  .schedule-content {
    grid-template-columns: 1fr;
  }
  
  .schedule-left {
    position: static;
  }
}

@media screen and (max-width: 768px) {
  .schedule-table {
    font-size: 13px;
  }
  
  .schedule-table th,
  .schedule-table td {
    padding: 8px;
  }
  
  .schedule-list {
    padding: 15px;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-form,
.schedule-list {
  animation: fadeIn 0.3s ease-out;
}

/* 统计部分样式 */
.statistics-section {
  padding: 24px;
  background: var(--background-light);
  border-radius: 16px;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.stats-card {
  background: var(--background-white);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 24px;
  transition: var(--transition-base);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats-card h3 {
  color: var(--primary-color);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
}

.department-stat-item {
  padding: 16px;
  background: var(--background-light);
  border-radius: 8px;
  margin-bottom: 16px;
}

.department-stat-item h4 {
  color: var(--primary-color);
  margin-bottom: 12px;
}

.department-stat-item p {
  color: var(--text-secondary);
  margin: 8px 0;
}

.time-stat-item,
.weekly-stat-item {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
}

.time-stat-item:last-child,
.weekly-stat-item:last-child {
  border-bottom: none;
}

.time-stat-item span:last-child,
.weekly-stat-item span:last-child {
  color: var(--primary-color);
  font-weight: 500;
}

/* 状态标签样式 */
.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 500;
  position: relative;
  margin-right: 16px;
}

.status-tag::after {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 6px solid;
}

/* 待处理状态 */
.status-tag.pending {
  background-color: #fef6e6;
  color: #f6b03f;
}

.status-tag.pending::after {
  border-left-color: #fef6e6;
}

/* 已通过状态 */
.status-tag.approved {
  background-color: #e6f7e6;
  color: #52c41a;
}

.status-tag.approved::after {
  border-left-color: #e6f7e6;
}

/* 已拒绝状态 */
.status-tag.rejected {
  background-color: #fff1f0;
  color: #f5222d;
}

.status-tag.rejected::after {
  border-left-color: #fff1f0;
}

/* 处理中状态 */
.status-tag.processing {
  background-color: #e6f7ff;
  color: #1890ff;
}

.status-tag.processing::after {
  border-left-color: #e6f7ff;
}

/* 已完成状态 */
.status-tag.completed {
  background-color: #f6ffed;
  color: #52c41a;
}

.status-tag.completed::after {
  border-left-color: #f6ffed;
}

/* 已取消状态 */
.status-tag.cancelled {
  background-color: #f5f5f5;
  color: #999999;
}

.status-tag.cancelled::after {
  border-left-color: #f5f5f5;
}

/* 表格中的状态标签容器 */
.status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 状态标签动画效果 */
.status-tag {
  transition: all 0.3s ease;
}

.status-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 职位列表样式 */
.position-list {
  padding: 8px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
}

.position-item {
  padding: 8px 16px;
  margin: 4px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  background-color: var(--background-light);
}

.position-item:hover {
  background-color: rgba(0, 136, 220, 0.05);
  color: rgb(0, 136, 220);
  transform: translateX(5px);
}

.position-item.active {
  background-color: rgba(0, 136, 220, 0.1);
  color: rgb(0, 136, 220);
  font-weight: 500;
} 